package com.laozhao.dynamicMBean;
import javax.management.MBeanServer;
/**
* @author 作者  zhaoyu E-mail:774463266@qq.com
* @version 创建时间：2019年2月11日 下午2:48:22
* @description 
*/
import javax.management.MBeanServerFactory;
import javax.management.ObjectName;
//import com.sun.jdmk.comm.HtmlAdaptorServer;
public class HelloAgent {
    public static void main(String[] args) throws Exception {
        MBeanServer server = MBeanServerFactory.createMBeanServer();
        ObjectName helloName = new ObjectName("chengang:name=HelloDynamic");
        HelloDynamic hello = new HelloDynamic();
        server.registerMBean(hello, helloName);
        //ObjectName adapterName = new ObjectName("HelloAgent:name=htmladapter,port=8082");
       // HtmlAdaptorServer adapter = new HtmlAdaptorServer();
        //server.registerMBean(adapter, adapterName);
       // adapter.start();
        System.out.println("start.....");
    }
}